RUSTSEC-2025-0024: sync::mpsc: prevent double free on `Drop`
authorPetros Angelatos <petrosagg@gmail.com>
Tue, 8 Apr 2025 19:37:25 +0000 (22:37 +0300)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Fri, 24 Jul 2026 16:02:33 +0000 (18:02 +0200)
commit1c6f50334cc95d6f11eca5b9d0aa66fd71b59924
treeede499ebf5c6b395f9ebc61e9ba490f09098fc5f
parente490a0be70d32587c466e63adc19f2c3fed41db7
RUSTSEC-2025-0024: sync::mpsc: prevent double free on `Drop`

This PR is fixing a regression introduced by #121646 that can lead to a
double free when dropping the channel.

The details of the bug can be found in the corresponding crossbeam PR
https://github.com/crossbeam-rs/crossbeam/pull/1187

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
FG: cherry-pick from upstream b9e2ac5c7b1d6bb3b6f5fdfe0819eaf7e95bf7ff
FG: drop test context
Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email>
Gbp-Pq: Topic upstream
Gbp-Pq: Name RUSTSEC-2025-0024-sync-mpsc-prevent-double-free-on-Drop.patch
library/std/src/sync/mpmc/list.rs